package com.party.orders.mapper;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.party.domain.Coupon;

/**
 * 
 * @author Caizhf
 * @date 2017年7月28日下午4:20:03
 * @version v.0.1
 * @email 1115054416@qq.com 
 *
 * <p>Description: 优惠券</p>
 *
 */
public interface CouponMapper {

	Integer save(Coupon coupon);

	Integer deleteById(int cpid);

	Integer updateById(Coupon coupon);

	Coupon findById(int cpid);

	int countList(@Param("key")String key,@Param("userid")Integer userid,
			@Param("today")Date today,@Param("isOverdue")Boolean isOverdue);

	List<Coupon> list(@Param("key")String key,@Param("userid")Integer userid, 
			@Param("startIndex")int startIndex, @Param("pageSize")int pageSize, 
			@Param("today")Date today,@Param("isOverdue")Boolean isOverdue);

}
